﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using W.Warehouse.Domain;
using W.Warehouse.Repository.Interface;

namespace W.Warehouse.Repository.Impl
{
    public class StorageRepository : BaseRepositoy<Storage>, IStorageRepository
    {
        public StorageRepository(EFCoreDbContext context) : base(context)
        {
        }
        public EFCoreDbContext DB
        {
            get { return base.DB; }
        }
        public async Task<int> AddAsync(Storage t)
        {
            return await base.AddAsync(t);
        }

        public async Task<int> DeleteAsync(Storage t)
        {
            return await base.DeleteAsync(t);
        }

        public async Task<List<Storage>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<Storage>> GetAsync(Expression<Func<Storage, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<Storage> GetModelAsync(int id)
        {
            return await base.GetModelAsync(id);
        }

        public async Task<int> UpdateAsync(Storage t)
        {
            return await base.UpdateAsync(t);
        }

        public async Task<int> UpdateRangeAsync(List<Storage> t)
        {
            return await base.UpdateRangeAsync(t);
        }
    }
}
